<!-- Modal -->
<div id="add_contact_to_group" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="ModalAddToGroup" aria-hidden="true">
  <div class="modal-header">
    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
    <h3 id="myModalLabel"> <?php echo Yii::t("main","Thêm liên hệ vào group") . ': <b>'.$group->name.'</b>';?></h3>
  </div>
  <div class="modal-body">
  <?php
    if($providerContactToAddGroup->totalItemCount > 0){
        $this->widget('zii.widgets.grid.CGridView', array(
            'id'=>'contact-grid',
            'dataProvider'=> $providerContactToAddGroup,
            'loadingCssClass' => 'grid-loading',
            'summaryText' => '',
            'columns'=>array(
              array(
                  'class'=>'CCheckBoxColumn',
                  'selectableRows' => 2
              ),
                array(
                    'name' => 'full_name',
                  'htmlOptions' => array(
                  )
                 ),
                array(
                    'name' => 'email',
                  'htmlOptions' => array(
                  )
                )
            ),
        ));
    }else{?>
      <div class="no-item">
        <i class="no-item-icon icon-inbox"></i>
        <div class="clearfix"></div>
        <h2><?php echo Yii::t("main","Thêm liên hệ vào nhóm này");?></h2>
        <a class="btn btn-large btn-success" href="<?php echo Yii::app()->createUrl('contacts/contact/create/group_id/'.$group->id);?>" ><?php echo Yii::t("main","Thêm liên hệ");?></a>
      </div>
    <?php }?>
  </div>
  <div class="modal-footer">
    <div class="loading" style="display:none"></div>
    <button class="btn" data-dismiss="modal" aria-hidden="true"><?php echo Yii::t("main","Hủy");?></button>
    <?php if($providerContactToAddGroup->totalItemCount): ?>  
    <button class="btn btn-primary" id="add_to_group"><?php echo Yii::t("main","Thêm vào nhóm");?></button>
    <?php endif; ?>
  </div>
</div>